home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group98c.txt / 000028_icon-group-sender _Tue Sep 15 09:00:31 1998.msg < prev    next >
Internet Message Format  |  2000-09-20  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) with SMTP id JAA00809
  4.     for <icon-group-addresses@baskerville.CS.Arizona.EDU>; Tue, 15 Sep 1998 09:00:30 -0700 (MST)
  5. Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
  6.     id AA03147; Tue, 15 Sep 1998 09:00:02 -0700
  7. From: gep2@computek.net
  8. Date: Mon, 14 Sep 1998 23:15:51 -0500 (CDT)
  9. Message-Id: <199809150415.XAA12328@mail.cmpu.net>
  10. Mime-Version: 1.0
  11. Content-Type: text/plain
  12. Content-Transfer-Encoding: 7bit
  13. Subject: Re: Context Switching
  14. To: icon-group@optima.CS.Arizona.EDU
  15. X-Mailer: SPRY Mail Version: 04.00.06.17
  16. Content-Transfer-Encoding: 7bit
  17. Content-Transfer-Encoding: 7bit
  18. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  19. Content-Transfer-Encoding: 7bit
  20. Status: RO
  21.  
  22. > Does it really require threads to do context switching?  
  23.  
  24. Well, MAYBE not, but that's probably one of the easier ways to implement them.
  25.  
  26. > I can see the possibility, but it's not as though the context switching that 
  27. happens in Icon requires a "whole separate executable," is it?
  28.  
  29. It certainly would NOT _require_ a separate executable.
  30.  
  31. > I have written subroutines in C that use static local variables to
  32. remember their "current state," so that every time you call them, they
  33. remember what was going on at the last call, and just pick up from
  34. there.  They work like charms.
  35.  
  36. > It seems to me something similar could happen in Icon without the
  37. complication of threads.
  38.  
  39. > Maybe I'm missing something fundamental about the purpose of context
  40. switching in Icon?  I haven't been using the language all that long.
  41.  
  42. It's more complicated than one might imagine due to the fact (to name just one 
  43. example) that a given routine can be entered recursively, and that there is no 
  44. guarantee that the recursions (and returns) will all be properly nested.
  45.  
  46.  
  47. Gordon Peterson
  48. http://www.computek.net/public/gep2/
  49. Support the Anti-SPAM Amendment!  Join at http://www.cauce.org/
  50.  
  51.